<?php
/**
 * @Author: Wang chunsheng  email:2192138785@qq.com
 * @Date:   2020-05-11 15:15:03
 * @Last Modified by:   Wang chunsheng  email:2192138785@qq.com
 * @Last Modified time: 2020-06-02 01:46:32
 */
use common\models\DdRegion;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model diandi\admin\models\BlocStore */
/* @var $form yii\widgets\MyActiveForm */
?>

<div class="bloc-store-form">

    <?php $form = ActiveForm::begin(); ?>
            <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
                 <?= Html::activeHiddenInput($model, 'bloc_id', array(
                    'value' => Yii::$app->params['bloc_id'],
                )); ?>
                
                <?= $form->field($model, 'name')->textInput(['maxlength' => true]); ?>
                <?= $form->field($model, 'extra[intro]')->textInput()->label('简介'); ?>
                <?= $form->field($model, 'address')->textInput(['maxlength' => true]); ?>
              
              <?= $form->field($model, 'lng_lat')->widget('common\widgets\adminlte\Map', [
                    'type' => 'baidu',
                    'secret_key' => Yii::$app->settings->get('Map', 'baiduApk'),
                ]); ?>
                
                <?= $form->field($model, 'status')->radioList([
                        1 => '审核通过',
                        2 => '审核中',
                        3 => '审核未通过',
                ], ['style' => 'height:35px;line-height:35px;']); ?>
                     <?= $form->field($model, 'extra[shareimg]')->hint('尺寸:200px*200px')->widget('common\widgets\webuploader\FileInput', [])->label('分享图片'); ?>
            </div>

            <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
               
                
                <?= $form->field($model, 'extra[distance]')->textInput()->label('配送距离'); ?>
                <?= $form->field($model, 'extra[sendtime]')->textInput()->label('配送时间段'); ?>
                 <?= $form->field($model, 'extra[startingPrice]')->textInput()->label('起送价格'); ?>
                <?= $form->field($model, 'extra[shippingDees]')->textInput()->label('基础配送费'); ?>
                <?= $form->field($model, 'extra[banner]')->hint('尺寸:375px*100px')->widget('common\widgets\webuploader\FileInput', [])->label('小程序首页横幅'); ?>
            </div>
                
             
            <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
                
                <?= $form->field($model, 'mobile')->textInput(['maxlength' => true]); ?>
                <?= $form->field($model, 'extra[Lodop_ip]')->textInput()->label('打印机局域网IP'); ?>
                <?= $form->field($model, 'extra[service]')->textInput()->label('服务内容'); ?>
                <?= $form->field($model, 'extra[hotSearch]')->textInput(['maxlength' => 255])->label('热搜关键词'); ?>
                <?= $form->field($model, 'extra[notice]')->textInput(['maxlength' => 50])->label('公告'); ?>
                <?= $form->field($model, 'logo')->hint('尺寸:100px*100px')->widget('common\widgets\webuploader\FileInput', [])->label('商家logo'); ?>
            </div>

<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <?= $form->field($model, 'extra[des]')->textarea(['row' => 3, 'maxlength' => 120])->label('详细介绍'); ?>

            <?= $form->field($model, '地区')->widget(\diandi\region\Region::className(), [
                                'model' => $model,
                                'url' => \yii\helpers\Url::toRoute(['get-region']),
                                'province' => [
                                    'attribute' => 'province',
                                    'items' => DdRegion::getRegion(),
                                ],
                                'city' => [
                                    'attribute' => 'city',
                                    'items' => DdRegion::getRegion($model['province']),
                                ],
                                'district' => [
                                    'attribute' => 'county',
                                    'items' => DdRegion::getRegion($model['city']),
                                ],
                            ]);
                ?>
       

                    <?= $form->field($model, 'extra[surroundings]')->hint('尺寸:400px*400px')->widget('common\widgets\webuploader\FileInput', [
                        'clientOptions' => [
                            'pick' => [
                                'multiple' => true,
                            ],
                        ],
                    ])->label('商家环境'); ?>

      

        <?= $form->field($model, 'extra[certificate]')->widget('common\widgets\webuploader\FileInput', ['clientOptions' => [
            'pick' => [
                'multiple' => true,
            ],
        ]])->hint('尺寸:400px*400px')->label('资质证书'); ?>
</div>

   
   <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
   <div class="form-group">
        <?= Html::submitButton('保存', ['class' => 'btn btn-success']); ?>
    </div>
   </div>
   

  

   

    <?php ActiveForm::end(); ?>

</div>
